package com.superlc.ssm.modular.sys.controller;

import com.superlc.ssm.modular.sys.model.SysPermission;
import com.superlc.ssm.modular.sys.service.SysPermissionService;
import com.superlc.ssm.common.util.ResponseEntity;
import com.superlc.ssm.common.util.ResponseUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

/**
 * @ProjectName: ssm$
 * @Package: com.superlc.ssm.modular.sys.controller$
 * @ClassName: PermissionController$
 * @Description: java类作用描述
 * @Author: super
 * @CreateDate: 2018/8/15$ 13:48$
 * @UpdateUser: 更新者
 * @UpdateDate: 2018/8/15$ 13:48$
 * @UpdateRemark: 更新内容
 * @Version: 1.0
 */
@Controller
public class PermissionController {

    @Resource
    private SysPermissionService sysPermissionService;

    @ResponseBody
    @RequestMapping("/addPermission")
    public ResponseEntity addPermission(SysPermission sysPermission){
        sysPermissionService.insert(sysPermission);
        return ResponseUtils.success(sysPermission);
    }
}

